#!/usr/bin/env python
# -*- coding: utf-8 -*-
import hashlib


def getFileMd5(filePath):
    """
    获取文件md5值
    :param filePath: 文件路径名
    :return: 文件md5值
    """
    with open(filePath, 'rb') as f:
        md5obj = hashlib.md5()
        md5obj.update(f.read())
        _hash = md5obj.hexdigest()
    return str(_hash).upper()
